import {
	request
} from '@/util/api.js'

// 图文产品发布及产品编辑提交
export const productAddEdit = (data) => {
	return request({
		url: 'api/product/productAddEdit',
		method: 'post',
		data
	})
}

// 图文产品编辑回显
export const productEdit = (data) => {
	return request({
		url: 'api/product/productEdit',
		method: 'post',
		data
	})
}

// 上主页---添加产品到当前企业的主页
export const userHomepage = (data) => {
	return request({
		url: 'api/user/homepage',
		method: 'post',
		data
	})
}

// 图文产品删除
export const productDel = (data) => {
	return request({
		url: 'api/product/del_products',
		method: 'post',
		data
	})
}

// 新增荣誉
export const honorAdd = (data) => {
	return request({
		url: 'api/honor/add',
		method: 'post',
		data
	})
}

// 荣誉详情
export const honorEditInfo = (data) => {
	return request({
		url: 'api/honor/editInfo',
		method: 'get',
		data
	})
}

// 荣誉编辑提交
export const honorEdit = (data) => {
	return request({
		url: 'api/honor/edit',
		method: 'post',
		data
	})
}

// 荣誉删除
export const honorDel = (data) => {
	return request({
		url: 'api/honor/del',
		method: 'post',
		data
	})
}

// 项目发布
export const caseAdd = (data) => {
	return request({
		url: 'api/project/add',
		method: 'post',
		data
	})
}

// 项目详情
export const caseInfo = (data) => {
	return request({
		url: 'api/enterprise/show',//'api/project/show',
		method: 'post',
		data
	})
}

// 项目编辑
export const caseEdit = (data) => {
	return request({
		url: 'api/project/edit',
		method: 'post',
		data
	})
}

// 项目删除
export const caseDel = (data) => {
	return request({
		url: 'api/project/del',
		method: 'post',
		data
	})
}

// 资讯发布
export const Infoadd = (data) => {
	return request({
		url: 'api/news/add',
		method: 'post',
		data
	})
}

// 资讯编辑详情
export const InfoEditInfo = (data) => {
	return request({
		url: 'api/news/editInfo',
		method: 'get',
		data
	})
}

// 资讯编辑
export const InfoEdit = (data) => {
	return request({
		url: 'api/news/edit',
		method: 'post',
		data
	})
}

// 资讯删除
export const InfoDel = (data) => {
	return request({
		url: 'api/news/del',
		method: 'post',
		data
	})
}